{% extends "bootstrap/base.html" %}

{% block title %}My life photo album{% endblock %}
{% block head %}
{{ super() }}
<link rel="shortcut icon" href="{{ url_for('static', filename='favicon.ico') }}" type="image/x-icon">
<link rel="icon" href="{{ url_for('static', filename='favicon.ico') }}" type="image/x-icon">
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='styles.css') }}">

{% endblock %}

{% block navbar %}
<div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
    <div class="container">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle"
                    data-toggle="collapse" data-target=".navbar-collapse">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
        </div>
        
        <div class="navbar-collapse collapse">

            <ul class="nav navbar-nav">
                <li><a href="{{ url_for('main.index') }}">首页</a></li>
                <li><a href="{{ url_for('main.about') }}">关于</a></li>
                <!-- {% if current_user.is_authenticated %} -->
                <!-- <li><a href="{{ url_for('main.albums', username=current_user.username) }}">相册</a></li> -->
                <!-- <li><a href="{{ url_for('main.about') }}">关于</a></li> -->
                <!-- {% else %} -->
                <!-- <li><a href="{{ url_for('main.explore') }}">探索</a></li> -->
            
                <!-- {% endif %} -->
            </ul>
            
            <!--form class="navbar-form navbar-left" role="search">
              <div class="form-group">
                <input type="text" class="form-control" placeholder="搜索用户/相册">
              </div>
              <button type="submit" class="btn btn-default"><i class="glyphicon glyphicon-search"></i></button>
            </form-->
            <ul class="nav navbar-nav navbar-right">
                {% if current_user.is_authenticated %}
                                <li><a href="{{ url_for('main.new_album') }}">新建相册</a></li>
                                                <li><a href="{{ url_for('main.upload') }}">上传照片</a></li>


                <li class="dropdown">
                    <a class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true"
                       aria-expanded="false">
                        <span></span>
                        {{ current_user.name }} <strong class="caret"></strong>
                    </a>
                    <ul class="dropdown-menu">
                        <li><a href="{{ url_for('main.edit_profile', username=current_user.username) }}">编辑资料</a></li>
                        <li><a href="#">设置</a></li>
                        <li><a href="#">帮助</a></li>
                        <li class="divider"></li>
                        <li><a href="{{ url_for('auth.change_password') }}">更改密码</a></li>
                        <li><a href="{{ url_for('auth.change_email_request') }}">更改邮箱</a></li>
                        <li><a href='{{ url_for("auth.logout") }}'>注销</a></li>
                    </ul>
                
                
                </li>
                
                {% else %}
                <li><a href="{{ url_for('auth.login') }}">登录</a></li>
            </ul>
            
            {% endif %}
        
        </div>
    </div>
</div>

{% endblock %}

{% block content %}
<div class="container wrapper">
    {% for message in get_flashed_messages(with_categories=True) %}
    <div class="alert alert-{{ message[0] }}">
        <button type="button" class="close" data-dismiss="alert">&times;</button>
        {{ message[1] }}
    </div>
    {% endfor %}
    
    {% block page_content %}{% endblock %}
    
    <div class="push"></div>  <!-- push the footer so it stay at the bootom of the page -->
</div>

<div class="footer row">
    <div class="col-md-2"></div>
    <div class="col-md-6">
        <p>© 2019 <b>
           <!--  <span class="fan">翻</span>
            <span class="xiang">相</span>
            <span class="ce">册</span> -->

        </b> · <a href="#terms">隐私权和条款</a> · <a href="http://blog.sctux.com">博客</a> · <a href="https://github.com/guomaoqiu">Github项目</a> <strong>为了更好的观赏，请在PC浏览器输入网址<code>http://me.sctux.com</code>进行访问，感谢关注~</strong></p>
    </div>

    <div class="col-md-2">
        <p class="pull-right"><a id="totop" href="#">返回顶部</a></p>
    </div>
</div>
{% endblock %}

{% block scripts %}
{{ super() }}
{{ moment.include_moment() }}
{{ moment.lang('zh-cn') }}
{% endblock %}